<template>
	<view style="height: 100%">
		<view class="pageBox">
			<header-nav :headerTitle="headerTitle" headerBg="#fff" :searchHot="searchHot" :headerBgImg="!searchPage"
				:headerBack="headerBack" :backOnly="searchPage" :showBottom="!searchPage" module="siteConfig"
				:posiInfo="posiInfo" :needMessage="true" :pageHide="pageHideb" :show="true"></header-nav>

			<!-- 页面内容 -->
			<view :class="'pageContainer ' + grayscale">
				<!-- 多图 广告位 s -->
				<view class="advSwiperBox" v-if="swiperItem.list.length > 0">
					<swiper :autoplay="swiperConfig.autoplay" :interval="swiperConfig.interval"
						:duration="swiperConfig.duration" :circular="true" indicator-color="rgba(255, 255, 255, .5)"
						indicator-active-color="#ffffff" @change="swiperChange">
						<block v-for="(item, index) in swiperItem.list" :key="index">
							<swiper-item>
								<view :class="'swiper-item ' + (index == swiperCurr ? 'currSwiper' : '')">
									<image :src="item.turl" mode="aspectFill" :data-type="item.urlType"
										:data-url="item.url" @tap="goLink" class="picAdv"></image>
									<image :src="`${imgStaticPath}/advMarkTouch.png?v=${imgVersion}`"
										:class="`advLabel _${item.advMarkPostion}_`"
										v-if="item.advMarkState==1&&item.markState==0"></image>
								</view>
							</swiper-item>
						</block>
					</swiper>
					<view class="pagination" v-if="swiperItem.list.length > 1">
						<block v-for="(item, index) in swiperItem.list" :key="index">
							<view :class="'pagination-bullets ' + (index == swiperCurr ? 'active' : '')"></view>
						</block>
					</view>
				</view>
				<!-- 多图  广告位 e -->

				<!-- 导航s -->
				<view class="swiper-container" v-if="moduleNav.length > 0">
					<swiper class="navSwiperBox" @change="swiperNavChange"
						:style="moduleCount < 6 ? 'height: 150rpx;' : 'height: 320rpx;'">
						<block v-for="(item, index) in moduleNav" :key="index">
							<swiper-item>
								<!-- 微信平台 -->
								<view class="navBox fn-clear" v-if="platForm=='mp-weixin'">
									<block v-for="(nav, idx) in item" :key="idx">
										<view class="nav" :data-url="nav.url" :data-id="nav.id" :data-type="nav.type"
											@tap="goLink" hover-class="none">
											<view class="icon-circle">
												<image :src="nav.icon" mode="aspectFill" />
											</view>
											<view class="icon-txt">{{ nav.name }}</view>
										</view>
									</block>
								</view>
								<!-- 抖音平台 -->
								<view class="navBox fn-clear" v-else>
									<block v-for="(nav, idx) in item" :key="idx">
										<view class="nav" :data-url="nav.url" :data-id="nav.id" :data-type="nav.type"
											@tap="goLink" hover-class="none"
											v-if="nav.url.indexOf('dyMiniprogram://im/')==-1">
											<view class="icon-circle">
												<image :src="nav.icon" mode="aspectFill" />
											</view>
											<view class="icon-txt">{{ nav.name }}</view>
										</view>
										<!-- 客服按钮 -->
										<button class="nav" open-type="im"
											:data-im-id="nav.url.split('/')[nav.url.split('/').length-1]" v-else>
											<view class="icon-circle">
												<image :src="nav.icon" mode="aspectFill" />
											</view>
											<view class="icon-txt">{{ nav.name }}</view>
										</button>
									</block>
								</view>
							</swiper-item>
						</block>
					</swiper>
					<view class="pagination" v-if="moduleNav.length > 1" :style="`bottom:${dot};`">
						<!-- <view class="pageCurr" style="width:{{(swiperNavCurr+1) /moduleNav.length * 100}}%"></view> -->
						<block v-for="(item, index) in moduleNav" :key="index">
							<view :class="'pagination-bullets ' + (index == swiperNavCurr ? 'active' : '')"></view>
						</block>
					</view>
				</view>
				<!-- 导航e -->

				<!-- 签到广告 -->
				<view class="qiandaoAdv" v-if="indexAdv[2]">
					<view :data-url="indexAdv[2].href" :data-type="indexAdv[2].urlType" @tap="goLink">
						<image :src="indexAdv[2].turl" mode="aspectFill" class="picAdv" />
						<image :src="`${imgStaticPath}/advMarkTouch.png?v=${imgVersion}`"
							:class="`advLabel _${indexAdv[2].advMarkPostion}_`"
							v-if="indexAdv[2].advMarkState==1&&indexAdv[2].markState==0"></image>
					</view>
				</view>

				<!-- 头条推荐 -->
				<view class="tcNews-box" v-if="moduleArr.article && tcNews.length > 0">
					<view class="news-icon">
						<image :src="imgPath + '/skin1/news_icon.png?v=' + imgVersion" mode="aspectFill" />
					</view>
					<view class="news-list">
						<swiper interval="4000" :circular="true" :autoplay="true" :vertical="true"
							display-multiple-items="2">
							<swiper-item v-for="(item, index) in tcNews" :key="index">
								<view class="news-item" data-code="article"
									:data-web="`${masterDomain}/article/detail/index?id=${item.id}`"
									:data-url="`/pages/packages/article/detail/index?id=${item.id}`" data-type="1"
									@tap="goLink">
									<view class="news-type">{{ item.typeName }}</view>
									<view class="news-title">{{ item.title }}</view>
								</view>
							</swiper-item>
						</swiper>
					</view>
				</view>

				<!-- 限时抢购 -->
				<view :class="'servericeall-box ' + (moduleArr.shop && deadshop.length > 0 ? '' : 'all_width')"
					v-if="moduleArr.shop || indexAdv[3]">
					<view class="deadline" v-if="moduleArr.shop && deadshop.length > 0">
						<view class="deadline-times">
							<view class="deadline-icon">
								<image :src="imgPath + '/skin1/qgou.png?v=' + imgVersion" mode="widthFix" />
							</view>
							<view class="deadline-show">
								<text>{{ time_h ? time_h : '00' }}</text>
								<text class="deadline-dot">:</text>
								<text>{{ time_m ? time_m : '00' }}</text>
								<text class="deadline-dot">:</text>
								<text>{{ time_s ? time_s : '00' }}</text>
							</view>
						</view>
						<view class="deadshop" v-if="'deadshop.length > 0'">
							<block v-for="(item, index) in deadshop" :key="index">
								<view class="shopitem" :data-url="item.url" data-type="0" @tap="goLink">
									<image :src="item.litpic" mode="aspectFill" />
									<text>{{ item.price }}</text>
								</view>
							</block>
						</view>
					</view>

					<view class="deadlineAdv" v-if="indexAdv[3]">
						<block v-for="(item, index) in indexAdv[3].list" :key="index">
							<view :data-url="item.url" :data-type="item.urlType" @tap="goLink">
								<image :src="item.turl" mode="aspectFill" class="picAdv" />
								<image :src="`${imgStaticPath}/advMarkTouch.png?v=${imgVersion}`"
									:class="`advLabel _${item.advMarkPostion}_`"
									v-if="item.advMarkState==1&&item.markState==0"></image>
							</view>
						</block>
					</view>
				</view>

				<!-- 本地商家 生活服务 贴吧社区 s -->
				<view :class="'statistics-tongji ' + busInfoTiebaClass"
					v-if="statisticsData && statisticsData.business">
					<view class="tongji-item busLi" :data-url="moduleArr.business.url" data-type="0" @tap="goLink"
						v-if="moduleArr.business">
						<view class="item-title">{{ moduleArr.business.name }}</view>
						<view class="item-count">
							<text class="item-number">{{ statisticsData ? statisticsData.business : 0 }}</text>
							家
						</view>
						<view class="item-btn">去看看</view>
						<view class="item-bg">
							<image
								:src="imgPath + '/skin1/row-' + (busInfoTiebaClass == 'smallLi' ? 'bg1' : 'bg11') + '.png?v=' + imgVersion"
								mode="aspectFill" />
						</view>
					</view>
					<view class="tongji-item infoLi" data-code="info" :data-web="`${masterDomain}/info/index/index`"
						data-url="/pages/packages/info/index/index" data-type="1" @tap="goLink" v-if="moduleArr.info">
						<view class="item-title">{{ moduleArr.info.name }}</view>
						<view class="item-count">
							<text class="item-number">{{ statisticsData ? statisticsData.info : 0 }}</text>
							条
						</view>
						<view class="item-btn">去看看</view>
						<view class="item-bg">
							<image
								:src="imgPath + '/skin1/row-' + (busInfoTiebaClass == 'smallLi' ? 'bg2' : 'bg22') + '.png?v=' + imgVersion"
								mode="aspectFill" />
						</view>
					</view>
					<view class="tongji-item tiebaLi" data-url="/pages/packages/tieba/index/index" data-type="1"
						@tap="goLink" v-if="moduleArr.tieba">
						<view class="item-title">{{ moduleArr.tieba.name }}</view>
						<view class="item-count">
							<text class="item-number">{{ statisticsData ? statisticsData.tieba : 0 }}</text>
							条
						</view>
						<view class="item-btn">去看看</view>
						<view class="item-bg">
							<image
								:src="imgPath + '/skin1/row-' + (busInfoTiebaClass == 'smallLi' ? 'bg3' : 'bg33') + '.png?v=' + imgVersion"
								mode="aspectFill" />
						</view>
					</view>
				</view>
				<!-- 本地商家 生活服务 便民黄页 e -->

				<!-- 圈子热门话题 s -->
				<view class="circle-talk" v-if="moduleArr.circle && circleTalk.length > 0">
					<view class="com-title" :data-url="moduleArr.circle.url" data-type="0" @tap="goLink">
						<view class="com-tit">热门话题</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>
					<view class="talk-con">
						<block v-for="(item, index) in circleTalk" :key="index">
							<view class="talk-ul">
								<block v-for="(topic, idx) in item" :key="idx">
									<view class="talk-item" :data-url="topic.url" data-type="0" @tap="goLink">
										<view :class="'talk-tag ' + topic.tagClass">{{ topic.tag }}</view>
										<text>{{ topic.title }}</text>
									</view>
								</block>
							</view>
						</block>
					</view>
				</view>
				<!-- 圈子热门话题 e -->

				<!-- 热门话题广告 -->
				<view class="circleAdv fn-clear" v-if="indexAdv[4]">
					<block v-for="(item, index) in indexAdv[4].list" :key="index">
						<view :data-url="item.url" :data-type="item.url" @tap="goLink">
							<image :lazy-load="true" :src="item.turl" mode="aspectFill" class="picAdv" />
							<image :src="`${imgStaticPath}/advMarkTouch.png?v=${imgVersion}`"
								:class="`advLabel _${item.advMarkPostion}_`"
								v-if="item.advMarkState==1&&item.markState==0"></image>
						</view>
					</block>
				</view>

				<!-- 生活服务查询 s -->
				<view class="service-search" v-if="indexAdv[5]">
					<view class="com-title" :data-url="masterDomain + '/114_homepage.html'" data-type="0" @tap="goLink">
						<view class="com-tit">生活服务查询</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>
					<view class="service-list fn-clear">
						<block v-for="(item, index) in indexAdv[5].list" :key="index">
							<view class="service-item" :data-url="item.url" :data-type="item.url" @tap="goLink">
								<image :lazy-load="true" :src="item.turl" mode="aspectFill" class="picAdv"/>
								<text>{{ item.title }}</text>
								<image :src="`${imgStaticPath}/advMarkTouch.png?v=${imgVersion}`"
									:class="`advLabel _${item.advMarkPostion}_`"
									v-if="item.advMarkState==1&&item.markState==0"></image>
							</view>
						</block>
					</view>
				</view>
				<!-- 生活服务查询 e -->

				<!-- 同城活动 s -->
				<view class="tc-activity-box" v-if="moduleArr.huodong && huodongData.length > 0">
					<view class="com-title" :data-url="moduleArr.huodong.url" data-type="0" @tap="goLink">
						<view class="com-tit">{{ moduleArr.huodong.name }}</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>
					<view class="tc-activity">
						<swiper :display-multiple-items="huodongData.length > 2 ? '2' : huodongData.length"
							next-margin="60rpx"
							:style="'width: ' + (huodongData.length > 2 ? 2 : huodongData.length) * 380 + 'rpx'">
							<block v-for="(item, index) in huodongData" :key="index">
								<swiper-item>
									<view class="tc-item" :data-url="item.url" data-type="0" @tap="goLink">
										<view class="act-img">
											<image :lazy-load="true" :src="item.litpic" mode="aspectFill" />
										</view>
										<view class="act-info">
											<text class="act-name">{{ item.title }}</text>
											<text class="act-time">{{ item.beganDate }}开始</text>
										</view>
									</view>
								</swiper-item>
							</block>
						</swiper>
					</view>
					<view class="tc-bg">
						<image :src="imgPath + '/skin1/circle.png?v=' + imgVersion" />
					</view>
				</view>
				<!-- 同城活动 e -->

				<!-- 推荐商家 s -->
				<view class="business-box" v-if="moduleArr.business && businessDataisLoad">
					<view class="tit_ul fn-clear">
						<view class="business-type">
							<view :class="'type-item ' + (!businessTypeid || businessTypeid == 0 ? 'active' : '')"
								@tap="businessList" data-type="0">精选商家</view>
							<block v-if="businessType">
								<block v-for="(item, index) in businessType" :key="index">
									<view :class="'type-item ' + (businessTypeid == item.id ? 'active' : '')"
										@tap="businessList" :data-type="item.id">{{ item.typename }}</view>
								</block>
							</block>
						</view>
						<view class="business-more" :data-url="moduleArr.business.url" data-type="0" @tap="goLink">
							<image :src="imgPath + '/skin1/more-module.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>
					<view class="business-con">
						<block v-if="businessData.length > 0">
							<swiper
								:style="'width: ' + (businessData.length > 2 ? 3 : businessData.length) * 252 + 'rpx'"
								:display-multiple-items="businessData.length > 2 ? '3' : businessData.length"
								next-margin="20rpx">
								<block v-for="(item, index) in businessData" :key="index">
									<swiper-item>
										<view class="business-item" :data-url="item.url" data-type="0" @tap="goLink">
											<view class="business-img">
												<image :lazy-load="true"
													:src="item.logo||masterDomain+'/static/images/404.jpg'"
													mode="aspectFill" />
											</view>
											<text class="business-name">{{ item.title }}</text>
										</view>
									</swiper-item>
								</block>
							</swiper>
						</block>
						<block v-else>
							<view class="no-data">
								<text>暂无数据</text>
							</view>
						</block>
					</view>
				</view>
				<!-- 推荐商家 e -->

				<!-- 贴吧社区 s -->
				<view class="tieba-box" v-if="moduleArr.tieba && tiebaData.length > 0">
					<view class="com-title" data-url="/pages/packages/tieba/index/index" data-type="1" @tap="goLink">
						<view class="com-tit">{{ moduleArr.tieba.name }}</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>

					<view class="tieba-con">
						<swiper next-margin="60rpx">
							<block v-for="(item, index) in tiebaData" :key="index">
								<swiper-item>
									<view :data-index="index" class="tie-item"
										:data-url="`/pages/packages/tieba/detail/detail?id=${item.id}`" data-type="1"
										@tap="goLink">
										<view class="tie-top">
											<image class="tie-icon"
												:src="imgPath + '/skin1/tie-' + (index % 2 == 0 ? 'icon1' : 'icon11') + '.png?v=' + imgVersion"
												mode="aspectFill" />
											<text>热议发帖</text>
											<image class="tie-more"
												:src="imgPath + '/skin1/more-arr.png?v=' + imgVersion"
												mode="aspectFill" />
										</view>
										<text class="tie-title">{{ item.title }}</text>
										<view class="tie-bottom">
											<image class="tie-icon"
												:src="imgPath + '/skin1/tie-' + (index % 2 == 0 ? 'icon2' : 'icon22') + '.png?v=' + imgVersion"
												mode="aspectFill" />
											<text>{{ item.reply }}人参与讨论</text>
										</view>
										<image class="tie-bg"
											:src="imgPath + '/skin1/tie-' + (index % 2 == 0 ? 'icon3' : 'icon33') + '.png?v=' + imgVersion"
											mode="aspectFill" />
									</view>
								</swiper-item>
							</block>
						</swiper>
					</view>
				</view>
				<!-- 贴吧社区 e -->

				<!-- 求职招聘 s -->
				<view class="job-box" v-if="moduleArr.job && jobData.length > 0">
					<view class="com-title fn-clear" data-code="job" :data-web="`${masterDomain}/job/index/index`"
						data-url="/pages/packages/job/index/index" data-type="1" @tap="goLink">
						<view class="com-tit">{{ moduleArr.job.name }}</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>

					<view class="job-nav">
						<view class="job-item job-meeting" :data-url="moduleArr.job.url + '/zhaopinhui.html'"
							data-type="0" @tap="goLink">
							<text>招聘会</text>
							<image :src="imgPath + '/skin1/bg-jobmeet.png?v=' + imgVersion" mode="aspectFill" />
						</view>
						<view class="job-item job-enterise" :data-url="moduleArr.job.url + '/company-list.html'"
							data-type="0" @tap="goLink">
							<text>找企业</text>
							<image :src="imgPath + '/skin1/bg-enterise.png?v=' + imgVersion" mode="aspectFill" />
						</view>
						<view class="job-item job-talent" :data-url="moduleArr.job.url + '/talent.html'" data-type="0"
							@tap="goLink">
							<text>找人才</text>
							<image :src="imgPath + '/skin1/bg-talent.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>

					<view class="job-con">
						<block v-for="(item, index) in jobData" :key="index">
							<view class="job-item">
								<view class="job" :data-url="item.url" data-type="0" @tap="goLink">
									<view class="job-name fn-clear">
										<text class="job-title">{{ item.title }}</text>
										<text class="job-price" v-if="item.show_salary == '面议'">面议</text>
										<text class="job-price" v-if="item.show_salary != '面议'">
											{{ item.show_salary }}
											<text class="unit">元/月</text>
										</text>
									</view>
									<view class="job-need">
										<view class="job-info" v-if="item.job_addr_detail">
											{{ item.job_addr_detail.addrName[item.job_addr_detail.addrName.length - 1] }}
											<text class="split" v-if="item.job_addr_detail && item.experience">|</text>
											{{ item.experience }}
											<text class="split" v-if="item.educational && item.experience">|</text>
											{{ item.educational }}
											<text class="split" v-if="item.nature && item.educational">|</text>
											{{ item.nature }}
										</view>
										<text class="job-time">{{ item.timeUpdate }}</text>
									</view>
									<view class="job-welfare"
										style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
										<block v-for="(item, index1) in item.welfare" :key="index1">
											<text>{{ item }}</text>
										</block>
									</view>
								</view>
								<view class="job-enterise fn-clear" :data-url="item.companyDetail.url" data-type="0"
									@tap="goLink">
									<view class="enterise-logo">
										<image :lazy-load="true" :src="item.companyDetail.logo" mode="aspectFill" />
									</view>
									<view class="enterise-info-detail">
										<text class="enterise-title">{{ item.companyDetail.title }}</text>
										<text class="enterise-info">
											{{ item.companyDetail.scale_name }}·{{ item.companyDetail.nature_name }}·{{
                                                item.companyDetail.industry ? item.companyDetail.industry_name : ''
                                            }}
										</text>
									</view>
								</view>
							</view>
						</block>
					</view>

					<view class="look-more" :data-url="moduleArr.job.url" data-type="0" @tap="goLink">
						<text>
							查看更多职位
							<i></i>
						</text>
						<image :src="imgPath + '/skin1/bottom-more.png?v=' + imgVersion" mode="aspectFill" />
					</view>
				</view>
				<!-- 求职招聘 e -->

				<!-- 精选房源 s -->
				<view class="house-box" v-if="moduleArr.house && houseData.length > 0">
					<view class="com-title fn-clear" :data-url="moduleArr.house.url" data-type="0" @tap="goLink">
						<view class="com-tit">精选房源</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>

					<view class="house-nav">
						<view class="house-item" :data-url="moduleArr.house.url + '/loupan.html'" data-type="0"
							@tap="goLink">新房</view>
						<view class="house-item" :data-url="moduleArr.house.url + '/sale.html'" data-type="0"
							@tap="goLink">二手房</view>
						<view class="house-item" :data-url="moduleArr.house.url + '/zu.html'" data-type="0"
							@tap="goLink">租房</view>
						<view class="house-item" :data-url="moduleArr.house.url + '/xzl.html'" data-type="0"
							@tap="goLink">写字楼</view>
						<view class="house-item" :data-url="moduleArr.house.url + '/sp.html'" data-type="0"
							@tap="goLink">商铺</view>
						<view class="house-item" :data-url="moduleArr.house.url + '/cf.html'" data-type="0"
							@tap="goLink">厂房/仓库</view>
						<view class="house-item" :data-url="moduleArr.house.url + '/cw.html'" data-type="0"
							@tap="goLink">车位</view>
					</view>

					<view class="house-con">
						<block v-for="(item, index) in houseData" :key="index">
							<view class="house-item fn-clear" :data-url="item.url" data-type="0" @tap="goLink">
								<view class="house-img">
									<image :lazy-load="true" :src="item.litpic" mode="aspectFill" />
								</view>
								<view class="house-info">
									<view class="house-title">
										<text class="house-name">{{ item.title }}</text>
										<view class="house-desc fn-clear">
											<view class="house-spec">
												{{ item.room }}
												<text class="split">|</text>
												{{ item.area }}㎡
											</view>
											<text class="house-price" v-if="item.price > 0">
												{{ item.price }}
												<text class="unit">万</text>
											</text>
											<text class="house-price" v-if="item.price <= 0">面议</text>
										</view>
									</view>
									<view class="house-distance fn-clear">
										<text class="house-area">{{ item.community }}</text>
										<text class="house-unitprice"
											v-if="item.unitprice > 0">{{ item.unitprice }}元/m²</text>
										<text class="house-unitprice" v-if="item.unitprice <= 0">面议</text>
									</view>
								</view>
							</view>
						</block>
					</view>

					<view class="look-more" :data-url="moduleArr.house.url" data-type="0" @tap="goLink">
						<text>
							查看更多房源
							<i></i>
						</text>
						<image :src="imgPath + '/skin1/bottom-more.png?v=' + imgVersion" mode="aspectFill" />
					</view>
				</view>
				<!-- 求职招聘 e -->

				<!-- 分类信息 s -->
				<view class="info-box" v-if="moduleArr.info && infoData.length > 0">
					<view class="com-title fn-clear" data-code="info" data-url="/pages/packages/info/index/index"
						:data-web="`${masterDomain}/info`" data-type="1" @tap="goLink">
						<view class="com-tit">{{ moduleArr.info.name }}</view>
						<view class="com-more">
							<text>更多</text>
							<image :src="imgPath + '/skin1/more-arr.png?v=' + imgVersion" mode="aspectFill" />
						</view>
					</view>

					<!-- 数据展示 -->
					<view class="infoList">
						<view class="horizontal_list">
							<block v-for="(item, info_index) in infoData" :key="info_index">
								<!-- 横图 -->

								<view class="info_item" v-if="item.picArr.length == 1">
									<view class="linkTo" code="info"
										:data-web="`${masterDomain}/info/detail/detail?id=${item.id}`"
										:data-url="'/pages/packages/info/detail/detail?id=' + item.id" data-type="1"
										:data-id="item.id" @tap="goLink">
										<view class="memberInfo">
											<view class="photo">
												<image :lazy-load="true" mode="aspectFill" :src="item.member.photo" />
												<image class="placeholderImg"
													:src="imgPath + '/info/noPhoto_100.jpg?v=' + imgVersion">
												</image>
											</view>
											<view class="memberDetail">
												<view class="h2">
													{{ item.member.nickname ? item.member.nickname : '佚名' }}
												</view>
												<view class="ptext">{{ item.pubdate1 }}</view>
											</view>
										</view>
										<view class="infoDetail">
											<view class="h3">
												<view class="toTop" v-if="item.isbid == '1'">置顶</view>
												<view class="typename">{{ item.typename }}</view>
												{{ item.titleNew }}
											</view>
											<view class="labs">
												<block v-for="(lab, bidx) in item.label" :key="bidx">
													<text v-if="bidx < 4" :key="bidx">{{ lab.name }}</text>
												</block>
												<block v-for="(lab, fidx) in item.feature3" :key="fidx">
													<text v-if="fidx + item.label.length < 4 && lab && lab != ''">
														{{ lab }}
													</text>
												</block>
											</view>
											<!-- vertical   horizontal -->
											<view class="imgBox singleImg horizontal">
												<view class="img">
													<image :lazy-load="true" :src="item.litpic" mode="aspectFill">
													</image>
													<image class="placeholderImg"
														:src="imgPath + '/info/404.jpg?v=' + imgVersion"
														mode="aspectFill"></image>
												</view>
												<view class="posi" v-if="item.dizhi">
													<image :lazy-load="true"
														:src="imgPath + '/info/posi.png?v=' + imgVersion"
														mode="aspectFill" />
													<text>{{ item.dizhi }}</text>
													{{ item.distance }}
												</view>
												<image class="hb"
													v-if="item.hasSetjili == '1' && (item.rewardCount > 0 || item.readInfo == '1')"
													:src="imgPath + '/info/hb.png?v=' + imgVersion" />
											</view>
											<view class="aboutInfo">
												<view class="shouCountBox span" v-if="item.collectnum > 500">
													<image class="icon"
														:src="imgPath + '/info/shou_icon.png?v=' + imgVersion" />
													<text class="shouCount">{{ item.collectnum }}人已收藏</text>
												</view>
												<view class="readCountBox span" v-else>
													<image class="icon"
														:src="imgPath + '/info/read_icon.png?v=' + imgVersion" />
													<text class="readCount">{{ item.click }}</text>
												</view>
												<view class="right_btn">
													<view class="commtCountBox span">
														<image class="icon"
															:src="imgPath + '/info/commt_icon.png?v=' + imgVersion" />
														<text
															class="commtCount">{{ item.common > 0 ? item.common : '留言' }}</text>
													</view>

													<block v-if="userid && !userPhoneCheck && privateNumber_state">
														<button class="phoneBox span" type="primary" data-module="info"
															data-temp="detail" :data-aid="item.id"
															@tap.stop.prevent="bindUserPhoneNumber"
															:data-index="info_index" :data-info="item">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</button>
													</block>
													<block v-else>
														<view class="phoneBox span" @tap.stop.prevent="callPhone"
															:data-index="info_index" :data-info="item"
															data-module="info" data-temp="detail" :data-aid="item.id"
															:data-tel="item.tel">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</view>
													</block>
												</view>
											</view>
										</view>
									</view>
								</view>

								<!-- 无图 -->

								<view class="info_item" v-if="item.picArr.length == 0">
									<view data-code="info"
										:data-web="`${masterDomain}/info/detail/detail?id=${item.id}`"
										:data-url="'/pages/packages/info/detail/detail?id=' + item.id" data-type="1"
										:data-id="item.id" @tap="goLink" class="linkTo">
										<view class="memberInfo">
											<view class="photo">
												<image :lazy-load="true" mode="aspectFill" :src="item.member.photo" />
												<image class="placeholderImg"
													:src="imgPath + '/info/noPhoto_100.jpg?v=' + imgVersion">
												</image>
											</view>
											<view class="memberDetail">
												<view class="h2">
													{{ item.member.nickname ? item.member.nickname : '佚名' }}
												</view>
												<view class="ptext">{{ item.pubdate1 }}</view>
											</view>
										</view>
										<view class="infoDetail moreText">
											<view class="h3">
												<view class="toTop" v-if="item.isbid == '1'">置顶</view>
												<view class="typename">{{ item.typename }}</view>
												{{ item.titleNew }}
											</view>
											<view class="labs">
												<block v-for="(lab, bidx) in item.label" :key="bidx">
													<text v-if="bidx < 4" :key="bidx">{{ lab.name }}</text>
												</block>
												<block v-for="(lab, fidx) in item.feature3" :key="fidx">
													<text v-if="fidx + item.label.length < 4 && lab && lab != ''">
														{{ lab }}
													</text>
												</block>
											</view>
											<view class="hbText" v-if="item.hasSetjili == '1'">
												<image class="hb" :src="imgPath + '/info/hb.png?v=' + imgVersion" />
												惊喜福利，红包人人领！
											</view>
											<view class="aboutInfo">
												<view class="shouCountBox span" v-if="item.collectnum > 500">
													<image class="icon"
														:src="imgPath + '/info/shou_icon.png?v=' + imgVersion" />
													<text class="shouCount">{{ item.collectnum }}人已收藏</text>
												</view>
												<view class="readCountBox span" v-else>
													<image class="icon"
														:src="imgPath + '/info/read_icon.png?v=' + imgVersion" />
													<text class="readCount">{{ item.click }}</text>
												</view>
												<view class="right_btn">
													<view class="commtCountBox span">
														<image class="icon"
															:src="imgPath + '/info/commt_icon.png?v=' + imgVersion" />
														<text
															class="commtCount">{{ item.common > 0 ? item.common : '留言' }}</text>
													</view>

													<block v-if="userid && !userPhoneCheck && privateNumber_state">
														<button class="phoneBox span" type="primary" data-module="info"
															data-temp="detail" :data-aid="item.id"
															@tap.stop.prevent="bindUserPhoneNumber"
															:data-index="info_index" :data-info="item">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</button>
													</block>
													<block v-else>
														<view class="phoneBox span" @tap.stop.prevent="callPhone"
															:data-index="info_index" :data-info="item"
															data-module="info" data-temp="detail" :data-aid="item.id"
															:data-tel="item.tel">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</view>
													</block>
												</view>
											</view>
										</view>
									</view>
								</view>

								<!-- 2张图 -->

								<view class="info_item" v-if="item.picArr.length == 2">
									<view data-code="info"
										:data-web="`${masterDomain}/info/detail/detail?id=${item.id}`"
										:data-url="'/pages/packages/info/detail/detail?id=' + item.id" data-type="1"
										@tap="goLink" class="linkTo" :data-id="item.id">
										<view class="memberInfo">
											<view class="photo">
												<image :lazy-load="true" mode="aspectFill" :src="item.member.photo" />
												<image class="placeholderImg"
													:src="imgPath + '/info/noPhoto_100.jpg?v=' + imgVersion">
												</image>
											</view>
											<view class="memberDetail">
												<view class="h2">
													{{ item.member.nickname ? item.member.nickname : '佚名' }}
												</view>
												<view class="ptext">{{ item.pubdate1 }}</view>
											</view>
										</view>
										<view class="infoDetail">
											<view class="h3">
												<view class="toTop" v-if="item.isbid == '1'">置顶</view>
												<view class="typename">{{ item.typename }}</view>
												{{ item.titleNew }}
											</view>
											<view class="labs">
												<block v-for="(lab, bidx) in item.label" :key="bidx">
													<text v-if="bidx < 4" :key="bidx">{{ lab.name }}</text>
												</block>
												<block v-for="(lab, fidx) in item.feature3" :key="fidx">
													<text v-if="fidx + item.label.length < 4 && lab && lab != ''">
														{{ lab }}
													</text>
												</block>
											</view>
											<view class="imgBox twoImg">
												<view class="img" v-for="(pic, ind) in item.picArr" :key="ind">
													<image :lazy-load="true" :src="pic.litpic" mode="aspectFill">
													</image>

													<image class="placeholderImg"
														:src="imgPath + '/info/404.jpg?v=' + imgVersion"
														mode="aspectFill"></image>
												</view>
												<view class="posi" v-if="item.dizhi">
													<image :src="imgPath + '/info/posi.png?v=' + imgVersion"
														mode="aspectFill" />
													<text>{{ item.dizhi }}</text>
													{{ item.distance }}
												</view>
												<image class="hb" v-if="item.hasSetjili == '1'"
													:src="imgPath + '/info/hb.png?v=' + imgVersion" />
											</view>
											<view class="aboutInfo">
												<view class="shouCountBox span" v-if="item.collectnum > 500">
													<image class="icon"
														:src="imgPath + '/info/shou_icon.png?v=' + imgVersion" />
													<text class="shouCount">{{ item.collectnum }}人已收藏</text>
												</view>
												<view class="readCountBox span" v-else>
													<image class="icon"
														:src="imgPath + '/info/read_icon.png?v=' + imgVersion" />
													<text class="readCount">{{ item.click }}</text>
												</view>
												<view class="right_btn">
													<view class="commtCountBox span">
														<image class="icon"
															:src="imgPath + '/info/commt_icon.png?v=' + imgVersion" />
														<text
															class="commtCount">{{ item.common > 0 ? item.common : '留言' }}</text>
													</view>

													<block v-if="userid && !userPhoneCheck && privateNumber_state">
														<button class="phoneBox span" type="primary" data-module="info"
															data-temp="detail" :data-aid="item.id"
															@tap.stop.prevent="bindUserPhoneNumber"
															:data-index="info_index" :data-info="item">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</button>
													</block>
													<block v-else>
														<view class="phoneBox span" @tap.stop.prevent="callPhone"
															:data-index="info_index" :data-info="item"
															data-module="info" data-temp="detail" :data-aid="item.id"
															:data-tel="item.tel">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</view>
													</block>
												</view>
											</view>
										</view>
									</view>
								</view>

								<!-- 多张图 -->

								<view class="info_item" v-if="item.picArr.length >= 3">
									<view data-code="info"
										:data-web="`${masterDomain}/info/detail/detail?id=${item.id}`"
										:data-url="'/pages/packages/info/detail/detail?id=' + item.id" data-type="1"
										@tap="goLink" class="linkTo" :data-id="item.id">
										<view class="memberInfo">
											<view class="photo">
												<image :lazy-load="true" mode="aspectFill" :src="item.member.photo" />
												<image class="placeholderImg"
													:src="imgPath + '/info/noPhoto_100.jpg?v=' + imgVersion">
												</image>
											</view>
											<view class="memberDetail">
												<view class="h2">
													{{ item.member.nickname ? item.member.nickname : '佚名' }}
												</view>
												<view class="ptext">{{ item.pubdate1 }}</view>
											</view>
										</view>
										<view class="infoDetail">
											<view class="h3">
												<view class="toTop" v-if="item.isbid == '1'">置顶</view>
												<view class="typename">{{ item.typename }}</view>
												{{ item.titleNew }}
											</view>
											<view class="labs">
												<block v-for="(lab, bidx) in item.label" :key="bidx">
													<text v-if="bidx < 4" :key="bidx">{{ lab.name }}</text>
												</block>
												<block v-for="(lab, fidx) in item.feature3" :key="fidx">
													<text v-if="fidx + item.label.length < 4 && lab && lab != ''">
														{{ lab }}
													</text>
												</block>
											</view>
											<view class="imgBox moreImg">
												<view class="imgScroll">
													<view class="img" v-for="(pic, ind) in item.picArr" :key="ind">
														<image :lazy-load="true" :src="pic.litpic" mode="aspectFill">
														</image>

														<image class="placeholderImg"
															:src="imgPath + '/info/404.jpg?v=' + imgVersion"
															mode="aspectFill"></image>
													</view>
												</view>
												<view class="posi" v-if="item.dizhi">
													<image :src="imgPath + '/info/posi.png?v=' + imgVersion"
														mode="aspectFill" />
													<text>{{ item.dizhi }}</text>
													{{ item.distance }}
												</view>
												<image class="hb" v-if="item.hasSetjili == '1'"
													:src="imgPath + '/info/hb.png?v=' + imgVersion" />
											</view>
											<view class="aboutInfo">
												<view class="shouCountBox span" v-if="item.collectnum > 500">
													<image class="icon"
														:src="imgPath + '/info/shou_icon.png?v=' + imgVersion" />
													<text class="shouCount">{{ item.collectnum }}人已收藏</text>
												</view>
												<view class="readCountBox span" v-else>
													<image class="icon"
														:src="imgPath + '/info/read_icon.png?v=' + imgVersion" />
													<text class="readCount">{{ item.click }}</text>
												</view>
												<view class="right_btn">
													<view class="commtCountBox span">
														<image class="icon"
															:src="imgPath + '/info/commt_icon.png?v=' + imgVersion" />
														<text
															class="commtCount">{{ item.common > 0 ? item.common : '留言' }}</text>
													</view>

													<block v-if="userid && !userPhoneCheck && privateNumber_state">
														<button class="phoneBox span" type="primary" data-module="info"
															data-temp="detail" :data-aid="item.id"
															@tap.stop.prevent="bindUserPhoneNumber"
															:data-index="info_index" :data-info="item">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</button>
													</block>
													<block v-else>
														<view class="phoneBox span" @tap.stop.prevent="callPhone"
															:data-index="info_index" :data-info="item"
															data-module="info" data-temp="detail" :data-aid="item.id"
															:data-tel="item.tel">
															<image class="icon"
																:src="imgPath + '/info/phone.png?v=' + imgVersion" />
															<text class="phone">电话</text>
														</view>
													</block>
												</view>
											</view>
										</view>
									</view>
								</view>
							</block>
						</view>
					</view>
					<!-- 列表e -->

					<view class="look-more" data-code="info" data-url="/pages/packages/info/index/index"
						:data-web="`${masterDomain}/info`" data-type="1" @tap="goLink">
						<text>
							查看更多
							<i></i>
						</text>
						<image :src="imgPath + '/skin1/bottom-more.png?v=' + imgVersion" mode="aspectFill" />
					</view>
					<!-- 支付弹窗 -->
					<paypop id="paypop" :wx:hidden="!payPhoneState" :showPayPop="showPayPop" :payInfo="payInfo"
						@keepToCall="keepToCall($event, { tagId: 'paypop' })" ref="pay" @paypopb="showPayPop=false">
					</paypop>
				</view>
				<!-- 分类信息 e -->
			</view>
		</view>

		<!-- 隐私保护通话 -->
		<privatenumber :phoneData="phoneData" @showPrivateNumber="phoneData.showPrivateNumber=0"
			@showhasPayNumber="phoneData.showhasPayNumber=0" ref="privatenumber" @topay="directTopay"
			@haspay="keepToCall" :payInfo="payInfo"></privatenumber>
		<private_tip :privateShow="privateb"></private_tip>
	</view>
</template>

<script>
	var _this;
	var deadshopTimes;
	import headerNav from '../../components/public_header/public_header.vue';
	import paypop from '../../components/public_pay/public_pay';
	// pages/skin5/index.js
	//获取应用实例 
	const app = getApp();
	export default {
		components: {
			headerNav
		},
		data() {
			return {
				privateb: false,
				pageHideb: false, //页面显隐
				headerTitle: '',
				moduleArr: [],
				searchHot: [],
				swiperCurr: 0,

				//广告位当前显示
				swiperNavCurr: 0,

				//导航当前显示
				swiperItem: {
					list: []
				},

				//广告图
				indexAdv: {},

				//广告图(非幻灯)
				masterDomain: app.globalData.masterDomain,
				imgStaticPath: app.globalData.imgStaticPath,

				//系统主域名
				navTop: app.globalData.navTop,

				//头部距离
				imgVersion: app.globalData.imgVersion,

				//图片版本号
				imgPath: app.globalData.imgPath,

				//图片目录
				cityInfo: {
					name: app.globalData.cityInfo.name || '加载中',
					cityid: app.globalData.cityInfo.cityid
				},

				//定位城市
				tcNews: {},

				//头条推荐
				deadshop: [],

				//限时抢购
				statisticsData: [],

				//商家、分类信息、贴吧统计数据
				circleTalk: [],

				//热门话题
				huodongData: [],

				//同城活动
				businessType: [],

				//商家分类
				businessData: [],

				//精选商家
				tiebaData: [],

				//贴吧社区
				jobData: [],

				//招聘求职
				houseData: [],

				//精选房源
				infoData: [],

				//分类信息
				swiperConfig: {
					indicatorDots: true,
					autoplay: true,
					interval: 4000,
					duration: 200
				},

				//轮播图配置
				userid: 0,

				privateNumber_state: 0,
				userPhoneCheck: 0,
				payInfo: {},

				//支付信息
				showPayPop: false,

				currentElementEvent: null,

				//当前点击号码的event
				currInd: 0,

				//付费查看电话
				payPhoneState: app.globalData.appConfig.cfg_payPhoneState ? app.globalData.appConfig.cfg_payPhoneState : 0,

				grayscale: '',
				moduleNav: '',
				moduleCount: '',
				busInfoTiebaClass: '',
				time_h: '',
				time_m: '',
				time_s: '',
				businessDataisLoad: false,
				businessTypeid: '',
				searchPage: '',
				headerBack: '',
				posiInfo: {},

				nav: {
					url: '',
					id: '',
					type: '',
					icon: '',
					name: ''
				},

				url: '',
				name: '',

				topic: {
					url: '',
					tagClass: '',
					tag: '',
					title: ''
				},

				info_index: 0,
				bidx: 0,

				lab: {
					name: ''
				},

				fidx: '',
				ind: '',

				pic: {
					litpic: ''
				},
				phoneData: {},
				// 兼容项
				dot: '',
				platForm: '',
				iosMiniHide: false,
				cacheData: {}, //缓存数据
			};
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad: function(options) {
			_this = this;
			if (app.globalData.wxprivate == -1) {
				app.watchG('wxprivate', function(value) {
					_this.wxprivate = value;
					if (value) { //弹出弹窗
						_this.privateb = true;
					} else {
						_this.onload(options);
					}
				})
			} else {
				if (app.globalData.wxprivate) { //弹出弹窗
					_this.privateb = true;
				} else {
					_this.onload(options);
				}
			}
		},
		onReady() {
			let _this = this;
			var appInterval = setInterval(function() {
				if (app.globalData.appConfig && app.globalData.appConfig.cfg_basehost) {
					//数据请求完成
					_this.userid = app.globalData.userid;
					_this.privateNumber_state = app.globalData.appConfig.cfg_privateNumber_state ? app
						.globalData.appConfig.cfg_privateNumber_state : 0;
					//是否开启隐私通话
					_this.payPhoneState = app.globalData.appConfig.cfg_payPhoneState ? app.globalData
						.appConfig.cfg_payPhoneState : 0 //是否开启付费查看电话

					clearInterval(appInterval);
				}
			});
		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {
			if (app.globalData.cityInfo.name) {
				var cityname = app.globalData.cityInfo.name;
			} else {
				var cityname = '';
			}
			var title = app.globalData.appConfig.share.title;
			title = title.split('$city').join(cityname);
			if (app.globalData.userid) {
				var useridShare = '?fromShare=' + app.globalData.userid;
			} else {
				var useridShare = '';
			}
			return {
				title: title,
				path: '/pages/skin1/index?' + useridShare,
				// imageUrl: shareDetail.litpic ? shareDetail.litpic : _this.sharePic
			};
		},
		onShareTimeline() {
			return {
				imageUrl: app.globalData.siteConfig.sharePic ? app.globalData.siteConfig.sharePic : app.globalData.masterDomain + '/include/json.php?action=getSystemLogo',
				title: app.globalData.siteConfig.description ? app.globalData.siteConfig.description : app.globalData
					.appConfig.share.title,
			};
		},
		// 后退回来后，重新加载数据
		onShow() {
			this.pageHideb = false;
			if (_this.cityInfo.cityid != app.globalData.cityInfo.cityid) {
				app.reloadFn();
			}
		},
		onHide() {
			this.pageHideb = true;
			clearInterval(deadshopTimes);
		},
		onUnload() {
			clearInterval(deadshopTimes);
		},
		/**
		 * 页面相关事件处理函数--监听用户下拉动作
		 */
		onPullDownRefresh: function() {
			app.reloadFn();
		},
		methods: {
			onload(options) {
				console.log(333333)
				app.cachePage('skin1', this);
				this.checkiOSMini();
				if (options.access_token && options.refresh_token) {
					app.globalData.userid = options.userid
					uni.setStorage({
						key: 'access_token',
						data: options.access_token
					});
					uni.setStorage({
						key: 'refresh_token',
						data: options.refresh_token
					});
					var token_expired = Date.parse(new Date()) / 1000 + 7200 -
						20; //两个小时有效期，保险起见，用1小时59分钟40秒
					uni.setStorage({
						key: 'token_expired',
						data: token_expired
					});
					uni.setStorage({
						key: 'userid',
						data: options.userid,
					})
				}
				//页面标题
				_this.headerTitle = app.globalData.miniProgramName;
				_this.userid = app.globalData.userid;
				_this.privateNumber_state = app.globalData.appConfig.cfg_privateNumber_state;
				_this.grayscale = app.globalData.appConfig.sitePageGray == '1' || app.globalData.appConfig
					.sitePageGray == '2' ? 'grayscale' : '';
				_this.loadDataFn();
				// 平台切换
				this.platForm = app.globalData.platForm;
				if (app.globalData.platForm == 'mp-toutiao') {
					this.dot = '-4rpx';
				} else if (app.globalData.platForm == 'mp-weixin') {
					this.dot = '0rpx';
				}

			},
			loadDataFn() {
				uni.getStorage({
					key: 'cityInfo',
					success(res) {
						_this.cityInfo = res.data;
						console.log('ceshi,' + res.data)
					},
				});
				uni.showLoading({
					title: '加载中...'
				});

				// 获取热搜词
				_this.getHotSearch();
				let times = 0;
				//广告位
				var cityInterval = setInterval(function() {
					++times;
					if (times > 5) { //五秒超时，手动选择
						clearInterval(cityInterval);
						uni.navigateTo({
							url: '/pages/changeCity/index?module=siteConfig'
						})
						return
					}
					if (app.globalData.cityInfo && app.globalData.cityInfo.cityid) {
						clearInterval(cityInterval);
						//导航加载完成后，加载模块数据
						_this.getModuleNav(function() {
							//头条推荐
							if (_this.moduleArr.article) {
								_this.getTcNews();
							}

							//限时抢购
							if (_this.moduleArr.shop) {
								_this.getDeadShop();
							}

							//商家、分类信息、贴吧数据统计
							_this.getStatistics();

							//圈子热门话题
							if (_this.moduleArr.circle) {
								_this.getCircleTalk();
							}

							//同城活动
							if (_this.moduleArr.huodong) {
								_this.getHuodong();
							}

							//精选商家
							_this.getBusiness();

							//贴吧社区
							if (_this.moduleArr.tieba) {
								_this.getTieba();
							}

							//招聘求职
							if (_this.moduleArr.job) {
								_this.getJob();
							}

							//精选房源
							if (_this.moduleArr.house) {
								_this.getHouse();
							}

							//分类信息
							if (_this.moduleArr.info) {
								_this.getInfo();
							}
						});
						let adv = app.globalData.advName;
						_this.getAdvBanner(`首页_模板一_${adv}_广告一`, 1); //幻灯
						_this.getAdvBanner(`首页_模板一_${adv}_广告二`, 0, 2); //签到
						_this.getAdvBanner(`首页_模板一_${adv}_广告三`, 0, 3); //限时抢购右侧
						_this.getAdvBanner(`首页_模板一_${adv}_广告四`, 0, 4); //热门话题广告
						_this.getAdvBanner(`首页_模板一_${adv}_广告五`, 0, 5); //生活服务查询
					}
				}, 1000);
				uni.hideLoading();
			},

			// 获取热搜词
			getHotSearch() {
				var dataPrarm = 'service=siteConfig&action=hotkeywords&module=index';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.post({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						_this.searchHot = data.info;
					} else {
						_this.searchHot = []
					}
					_this.cacheData['searchHot'] = _this.searchHot;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 获取模块导航
			getModuleNav(func) {
				var dataPrarm = 'service=siteConfig&action=siteModule&type=1';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info;
						var moduleArr = {};
						var busInfoTiebaCount = 1;
						for (var i = 0; i < list.length; i++) {
							if (list[i].code) {
								moduleArr[list[i].code] = list[i];
								if (list[i].code == 'info') {
									busInfoTiebaCount++;
								}
								if (list[i].code == 'tieba') {
									busInfoTiebaCount++;
								}
							}
							var url = list[i].url;
							var type = 0;
							let code = list[i].code; //模块名称
							let newUrl = _this.urlProcess(code, url);
							if (newUrl.type == 'mini') {
								url = `/pages/packages/${code}/index/index`; //模块首页
								type = 1;
							}

							//小程序类型
							if (list[i].url.indexOf('wxMiniprogram://') > -1) {
								type = 2;
							}
							list[i] = {
								name: list[i].name,
								icon: list[i].icon,
								url: url,
								type: type
							};
						}
						var navList = [];
						for (i = 0, len = list.length, void 0; i < len; i += 10) {
							var i;
							var len;
							navList.push(list.slice(i, i + 10));
						}
						busInfoTiebaCount = moduleArr['business'] ? busInfoTiebaCount : busInfoTiebaCount -
							1;
						_this.moduleNav = navList;
						_this.moduleArr = moduleArr;
						_this.moduleCount = list.length;
						_this.busInfoTiebaClass = busInfoTiebaCount == 3 ? 'smallLi' :
							busInfoTiebaCount == 2 ? 'middleLi' : '';
						func(); //加载模块数据
					} else {
						_this.moduleNav = [];
						_this.moduleArr = [];
						_this.moduleCount = 0;
						_this.busInfoTiebaClass = '';

						func(); //加载模块数据
					}
					_this.cacheData['moduleCount'] = _this.moduleCount;
					_this.cacheData['moduleNav'] = _this.moduleNav;
					_this.cacheData['moduleArr'] = _this.moduleArr;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},
			// 导航原生页面判断
			urlProcess(code, url) { //一个是原生页面code，一个是h5链接
				let config = app.globalData.appConfig;
				let arrModule = [];
				if (_this.platForm == 'mp-weixin') {
					arrModule = config.wxmini_native_module;
				} else if (_this.platForm == 'mp-toutiao') {
					arrModule = config.dymini_native_module;
				}
				let bool = arrModule.includes(code);
				if (bool) {
					return {
						type: 'mini',
						value: code
					} //使用原生
				} else {
					return {
						type: 'web',
						value: url
					} //使用h5
				}
			},
			// 获取头条推荐
			getTcNews() {
				var dataPrarm = 'service=article&action=alist&flag=h&pageSize=10';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						var data = [];
						for (var i = 0; i < list.length; i++) {
							data[i] = {
								title: list[i].title.replace(/<[^>]+>/g, ''),
								typeName: list[i].typeName[list[i].typeName.length - 1],
								url: list[i].url,
								id: list[i].id
							};
						}
						_this.tcNews = data;
					} else {
						_this.tcNews = [];
					}
					_this.cacheData['tcNews'] = _this.tcNews;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			//限时抢购场次
			getDeadShop() {
				var dataPrarm = 'service=shop&action=getConfigtime&gettype=1';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info;
						if (list.length > 0) {
							//已开抢
							if (list[0].now >= list[0].ktimestr && list[0].now <= list[0].etimestr) {
								_this.qgList(list[0].changci);
								//抢购倒计时
								var time = list[0].etimestr - list[0].now;
								deadshopTimes = setInterval(function() {
									if (time > 0) {
										var hour = parseInt((time / 60 / 60) % 24);
										var minute = parseInt((time / 60) % 60);
										var seconds = parseInt(time % 60);
										var time_h = hour < 10 ? '0' + hour : hour;
										var time_m = minute < 10 ? '0' + minute : minute;
										var time_s = seconds < 10 ? '0' + seconds : seconds;
										_this.time_h = time_h;
										_this.time_m = time_m;
										_this.time_s = time_s;
										time--;
									} else {
										clearInterval(deadshopTimes);
									}
								}, 1000);
							}
						}
					}
				})
			},

			//抢购商品
			qgList(time) {
				var dataPrarm = 'service=shop&action=proHuodongList&huodongtype=1&changci=' + time + '&pageSize=2';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data && data.state == 100 && data.info.list.length > 0) {
						var list = data.info.list;
						var deadshop = [];
						for (var i = 0; i < list.length; i++) {
							deadshop[i] = {
								url: list[i].url,
								litpic: app.changeFileSize(list[i].litpic, 240, 240),
								price: app.globalData.appConfig.currency.symbol + list[i].huodongprice
							};
						}
						_this.deadshop = deadshop;
					} else {
						_this.deadshop = [];
					}
					_this.cacheData['deadshop'] = _this.deadshop;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 商家、分类信息、贴吧数据统计
			getStatistics() {
				var dataPrarm = 'service=siteConfig&action=getStatistics';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info;
						_this.statisticsData = list
					} else {
						_this.statisticsData = []
					}
					_this.cacheData['statisticsData'] = _this.statisticsData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 圈子热门话题
			getCircleTalk() {
				var dataPrarm = 'service=circle&action=ranking&mold=0&page=1&pageSize=30&flag=h&type=topic';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						var len = list.length;
						var sumRec = 0;
						for (var k = 0; k < len; k++) {
							//求出所有数据的topic和
							sumRec += Number(list[k].topic);
						}
						var lastUn = Math.round(sumRec / len); //topic的平均值，大于平均值的是热，小于平均值的是普通

						for (var i = 0; i < len; i++) {
							if (list[i].rec == 1) {
								list[i].tagClass = 'new_blue';
								list[i].tag = '荐';
							} else {
								if (list[i].topic >= lastUn) {
									list[i].tagClass = 'hot';
									list[i].tag = '热';
								} else {
									list[i].tag = '#';
								}
							}
						}
						var circleTalk = [];
						for (i = 0, len = list.length, void 0; i < len; i += 10) {
							var i;
							var len;
							circleTalk.push(list.slice(i, i + 10));
						}
						_this.circleTalk = circleTalk
					} else {
						_this.circleTalk = []
					}
					_this.cacheData['circleTalk'] = _this.circleTalk;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 同城活动
			getHuodong() {
				var dataPrarm = 'service=huodong&action=hlist&page=1&pageSize=10';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						for (var i = 0; i < list.length; i++) {
							list[i]['litpic'] = app.changeFileSize(list[i].litpic, 320, 185);
							list[i]['beganDate'] = app.transTimes(list[i].began, 2);
						}

						_this.huodongData = list
					} else {

						_this.huodongData = []
					}
					_this.cacheData['huodongData'] = _this.huodongData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 精选商家
			getBusiness() {

				//已加载
				_this.businessDataisLoad = true

				//商家分类
				var dataPrarm = 'service=business&action=type&pageSize=10';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info;
						_this.businessType = list
					} else {
						_this.businessType = []
					}
					_this.cacheData['businessType'] = _this.businessType;
					uni.setStorageSync('skin1', _this.cacheData);
				})

				//加载商家列表
				_this.businessList();
			},

			// 商家列表
			businessList(e) {
				var typeid = e ? e.currentTarget.dataset.type : 0;
				_this.businessTypeid = typeid
				var dataPrarm = 'service=business&action=blist&store=2&typeid=' + typeid;
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						for (var i = 0; i < list.length; i++) {
							list[i].logo = app.changeFileSize(list[i].logo, 222, 208);
						}
						_this.businessData = list
					} else {
						_this.businessData = []
					}
					_this.cacheData['businessData'] = _this.businessData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 贴吧社区
			getTieba() {
				var dataPrarm = 'service=tieba&action=tlist&istop=1';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						_this.tiebaData = list
					} else {
						_this.tiebaData = []
					}
					_this.cacheData['tiebaData'] = _this.tiebaData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 招聘求职
			getJob() {
				var dataPrarm = 'service=job&action=postList&pageSize=5';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						for (var i = 0; i < list.length; i++) {
							var welfare = list[i]['companyDetail'] ? list[i]['companyDetail'][
								'welfareNames'
							] : [];
							list[i].welfare = welfare;
							list[i].nature = list[i].companyDetail.nature_name;
							let date = new Date(list[i].update_time * 1000);
							list[i].timeUpdate = app.transTimes(list[i].update_time, 2);
							if (list[i].companyDetail && list[i].companyDetail.logo) {
								list[i].companyDetail.logo = app.changeFileSize(list[i]
									.companyDetail.logo, 90, 90);
							}
						}
						_this.jobData = list
					} else {
						_this.jobData = []
					}
					_this.cacheData['jobData'] = _this.jobData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 精选房源
			getHouse() {
				var dataPrarm = 'service=house&action=saleList&page=1&pageSize=5';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						for (var i = 0; i < list.length; i++) {
							list[i].litpic = app.changeFileSize(list[i].litpic, 200, 150);
						}
						_this.houseData = list
					} else {
						_this.houseData = []
					}
					_this.cacheData['houseData'] = _this.houseData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 分类信息
			getInfo() {
				var dataPrarm = 'service=info&action=ilist_v2&page=1&pageSize=5&rec=1';
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.get({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						var list = data.info.list;
						_this.infoData = list;
						_this.userPhoneCheck = list[0].userPhoneCheck;
					} else {
						_this.infoData = []
					}
					_this.cacheData['infoData'] = _this.infoData;
					uni.setStorageSync('skin1', _this.cacheData);
				})
			},

			// 获取广告位
			getAdvBanner(title, type, index) {
				var dataPrarm = 'service=siteConfig&action=adv&model=siteConfig&cityid=' + app.globalData.cityInfo.cityid +
					'&title=' + title;
				var urlData = app.encodeUrl(dataPrarm);
				var advData = '';
				_this.$ajax.post({
					url: 'include/ajax.php?' + dataPrarm,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						advData = data.info;
						if (type) {
							var list = data.info.list;
							for (var i = 0; i < list.length; i++) {
								list[i].urlType = 0; //普通链接
								if (list[i].url.indexOf('wxMiniprogram://') > -1) {
									list[i].urlType = 2; //其他小程序
								} else if (list[i].url.indexOf('miniprogram://') > -1) {
									list[i].urlType = 1; //原生页面
								}
							}

							data.info.list = list;
							_this.swiperItem = data.info;
							_this.cacheData['swiperItem'] = _this.swiperItem;
							uni.setStorageSync('skin1', _this.cacheData);
						} else {
							var indexAdv = _this.indexAdv;
							var data = data.info;

							//单图
							if (data.class == 1) {
								data.urlType = 0; //普通链接
								if (data.href.indexOf('wxMiniprogram://') > -1) {
									data.urlType = 2; //其他小程序
								} else if (data.href.indexOf('miniprogram://') > -1) {
									data.urlType = 1; //原生页面
								}

								//多图
							} else if (data.class == 2) {
								var list = data.list;
								for (var i = 0; i < list.length; i++) {
									list[i].urlType = 0; //普通链接
									if (list[i].url.indexOf('wxMiniprogram://') > -1) {
										list[i].urlType = 2; //其他小程序
									} else if (list[i].url.indexOf('miniprogram://') > -1) {
										list[i].urlType = 1; //原生页面
									}
								}

								data.list = list;
							}
							indexAdv[index] = data;
							_this.indexAdv = indexAdv;
							_this.cacheData['indexAdv'] = _this.indexAdv;
							uni.setStorageSync('skin1', _this.cacheData);
						}
					}
				})
			},

			// 轮播图切换
			swiperChange(e) {
				this.swiperCurr = e.detail.current
			},

			// 导航切换
			swiperNavChange(e) {
				this.swiperNavCurr = e.detail.current
			},

			// 跳转链接
			goLink(e) {
				var currentTarget = e.currentTarget;
				var url = currentTarget.dataset.url;
				if (!url) {
					return false;
				}
				if (currentTarget.dataset.code) {
					let code = currentTarget.dataset.code;
					let web = currentTarget.dataset.web;
					let newUrl = _this.urlProcess(code, web);
					if (newUrl.type == 'mini') {
						uni.navigateTo({
							url: url
						})
					} else {
						uni.navigateTo({
							url: '/pages/redirect/index?url=' + encodeURIComponent(web)
						})
					}
					return false
				}
				//原生页面
				if (currentTarget.dataset.type == 1) {
					url = url.replace('miniprogram://', '/');
					uni.navigateTo({
						url: app.addUrlParam(url)
					});
					//小程序类型
				} else if (currentTarget.dataset.type == 2) {
					var ahref = url.replace('wxMiniprogram://', '');
					var miniId = ahref.split('?/')[0]; //小程序原始id
					var path = ahref.split('?/')[1]; //跳转的路径
					var _ghId = miniId.split('/')[0];
					var _appid = miniId.split('/')[1];
					var _path = path ? '/' + path : '';
					uni.navigateToMiniProgram({
						appId: _appid,
						path: _path,
						success(res) {
							// wx.navigateBack();
						},
						fail(res) {
							uni.showToast({
								title: res,
								icon: 'success',
								duration: 2000
							});
						}
					});
					//H5链接
				} else {
					if (url.indexOf('work.weixin.qq.com/kfid') > -1) {
						//小程序跳转客服
						var link = url.split('?id=')[0];
						var //客服链接
							id = url.split('?id=')[1]; //企业ID
						var path = '/pages/openkf/openkf?url=' + encodeURIComponent(link) + '&id=' + id;
						if (link && id) {
							uni.openCustomerServiceChat({
								extInfo: {
									url: link
								},
								corpId: id,
								success(res) {
									console.log(res);
								}
							});
						} else {
							uni.navigateTo({
								url: '/pages/redirect/index?url=' + encodeURIComponent(app.addUrlParam(
									url))
							});
						}
					} else {
						uni.navigateTo({
							url: '/pages/redirect/index?url=' + encodeURIComponent(app.addUrlParam(url))
						});
					}
				}
			},

			// 拨打电话
			callPhone(e) {
				var phone = e.currentTarget.dataset.tel;
				//判断是否登录
				var userid = app.globalData.userid;
				if (userid == null || userid == '') {
					app.tologin('/pages/index/index');
					return false;
				}
				var info = e.currentTarget.dataset.info;
				console.log(info.payPhoneState, !app.globalData.appConfig.cfg_payPhoneState);
				if (info.payPhoneState || !app.globalData.appConfig.cfg_payPhoneState) {
					//已经支付过/不要用付费
					uni.showLoading({
						title: '获取中...'
					});
					app.callPhone(this, phone, e.currentTarget.dataset);
					_this.currentElementEvent = null;
					_this.currInd = 0;
				} else {
					if (this.iosMiniHide) { //需要支付并且在ios小程序中
						this.showiOSPayMsg();
						return false
					}
					uni.showLoading({
						title: '获取中...'
					});
					_this.currentElementEvent = e;
					_this.currInd = e.currentTarget.dataset.index
					_this.getPhonePayAmount(e);
				}
			},

			// 支付完成 ，继续拨打
			keepToCall(data, _dataset) {
				if (data && data.fromAdv && data.fromAdv == 1) {} else {
					_this.infoData[_this.currInd].payPhoneState = 1;
					_this.infoData[_this.currInd].tel = data.detail.phone || data.detail.info;
				}
				uni.showLoading({
					title: '获取中...'
				});
				app.callPhone(_this, data.detail, _this.currentElementEvent.currentTarget.dataset);
			},

			// 新增 激励选择付费/广告中 直接支付 
			directTopay() {
				_this.showPayPop = true;
				var el = _this.$refs.pay;
				el.payCutDown(_this.payInfo, _this.payInfo.timeout);
			},

			// 获取付费金额
			getPhonePayAmount(e) {
				var module = e.currentTarget.dataset.module;
				var temp = e.currentTarget.dataset.temp;
				var aid = e.currentTarget.dataset.aid;
				var dataPrarm = 'service=siteConfig&action=payPhoneDeal&aid=' + aid + '&temp=' + temp + '&module=' +
					module;
				var urlData = app.encodeUrl(dataPrarm);
				_this.$ajax.post({
					url: 'include/ajax.php?' + urlData,
				}).then(res => {
					var data = res.data;
					if (data.state == 100) {
						_this.payInfo = data.info;
						// 只有在微信小程序中才会显示
						if (app.globalData.appConfig && app.globalData.appConfig.cfg_payPhone && ((_this
								.platForm == 'mp-weixin' && app.globalData.appConfig.cfg_payPhone.wxmini) || (
								_this.platForm == 'web' && app.globalData.appBoolean && window.Android && app
								.globalData.appConfig.cfg_payPhone.tencentGDP_app_id && app.globalData
								.appConfig.cfg_payPhone.tencentGDP_placement_id))) {
							_this.$refs.privatenumber.showRewardPop = true;
						} else {
							_this.directTopay()
						}
					} else {}
				})
			},


			// 获取用户手机号
			bindUserPhoneNumber: function(data) {
				let uCenter = app.globalData.appConfig.cfg_user_index;
				uni.navigateTo({
					url: '/pages/redirect/index?url=' + uCenter + '/security-chphone.html'
				})
				// app.bindUserPhoneNumber(this, data, function() {
				// 	var infoDetail = data.currentTarget.dataset.info;
				// 	_this.currentElementEvent = data;
				// 	_this.currInd = data.currentTarget.dataset.index;
				// 	if (app.globalData.appConfig.cfg_payPhoneState && !infoDetail.payPhoneState) {
				// 		_this.callPhone(data);
				// 	}
				// });
			},

			useOtherPhoneNumber: function(data) {
				app.useOtherPhoneNumber(this, data);
			},

			// 监听获取设备信息
			checkiOSMini() {
				const _this = this;
				let hasData = null
				_this.iosMiniHide = app.globalData.iOSMiniPay_forbid; //ios端需要隐藏支付
				if (!app.globalData.appConfig) { //未获取到appConfig
					app.essentialData(function(data) {
						_this.iosMiniHide = data.iOSMiniPay_forbid; //禁止
					})
				}
			},

			// 显示弹窗
			showiOSPayMsg() {
				const _this = this;
				uni.showModal({
					title: '温馨提示',
					content: app.globalData.iosMiniPay_msg,
					showCancel: false, //隐藏取消按钮
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
						}
					},

				})
			},
		}
	};
</script>
<style>
	@import './index.css';
	@import '@/components/privatenumber/privatenumber.css';
</style>